/**
 *  设备端数据管理:public CommunicateNotify
 
 */
#ifndef _DEVDATA_MGR_H_
#define _DEVDATA_MGR_H_
#include <vector>
#include <Windows.h>
#include "communicate_notify.h"
#include "../base/data_buffer.h"

class DevDataMgr : public CommunicateNotify
{
public:

    DevDataMgr();
	
	~DevDataMgr();

	bool init();

	void unInit();

	virtual int onDevAuth(const unsigned char *authPack, const int packSize);

	virtual int onRecvData(const int dataBufferId, const unsigned char *buffer, const int size);

    virtual int onDevDisConnect(const int dataBufferId);

private:
	static DWORD WINAPI dataTaskProc(PVOID arg);

private:

    std::vector<DataBuffer> _dataBufferList; 

	bool _isRunProc;
};
#endif 